
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.usermanage.tool.Page"%>
<%@page import="java.util.List" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>工作笔记</title>
<link rel="stylesheet" type="text/css" href="css/show.css"/>
<script src="js/show.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
	<div id="all">
		<h1>Hi~ ${name} 欢迎使用云端通讯录系统</h1>
		<table border="1" cellpadding="1" cellspacing="1">
			<tr>
				<td colspan="8" style="font-size: 30px;">我的通讯录</td>
				
			</tr>
			<tr>
				<td>姓名</td>
				<td>手机号</td>
				<td>地址</td>
				<td>操作</td>
			</tr>
			<c:forEach var="u" items="${ulist}" varStatus="status">
				<tr <c:if test="${status.index%2==0}">style="background-color:gray;"</c:if>>
					<td>${u.getName()}</td>
					<td>${u.getPhone()}</td>
					<td>${u.getAddress()}</td>
					<td><input type="button" value="修改" onclick="edit(${u.getId()})" /><input type="button" value="删除" onclick="del(${u.getId()})" /></td>
				</tr>	
			</c:forEach>
			<tr>
				<td colspan="8">
				<input type="button" name="add" id="add" value="新增联系人" onclick="javaScript:window.location='add.jsp'"/>
				共${page.totalCount}条记录数 每页<input type="text" name="setCount" id="setCount" value="${page.currCount}"  onblur="changecount()"/>
				第${page.currPage }页/共${page.totalPages }页
				<input type="button" name="up" value="首页" <c:if test="${page.currPage==1}">disabled="disabled"</c:if> onclick="fenye(1)" />
				<input type="button" name="up" value="上一页" <c:if test="${page.currPage==1}">disabled="disabled"</c:if>onclick="fenye(${page.currPage-1})" />
				<input type="button" name="down" value="下一页" <c:if test="${page.currPage>=page.totalPages}">disabled="true"</c:if> onclick="fenye(${page.currPage+1})"/>
				<input type="button" name="up" value="尾页" <c:if test="${page.currPage>=page.totalPages}">disabled="true"</c:if> onclick="fenye(${page.totalPages})" />
				转到第<input type="text" id="inputpage"/>页<input type="button" name="jump" value="go" onclick="fenye2()"/>

				<input type="hidden" id="totalpage" value="${page.totalPages}"/>
				
			</td>
			</tr>
			
		</table>

		
		
	</div>
</body>
</html>